{extend name='admin@public/content'}

{block name="content"}
<!-- 表单搜索 开始 -->
<form autocomplete="off" class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">用户账号</label>
        <div class="layui-input-inline">
            <input name="username" value="{$Think.get.username|default=''}" placeholder="输入手机号/微信昵称/账号" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">会员等级</label>
        <div class="layui-input-inline">
            <select name="role" class="layui-select">
                <option value="">请选择</option>
                {foreach($list['role'] as $k=>$v)}
                {if $Think.get.role eq $v.id and $Think.get.role !==''}
                <option selected="selected" value="{$v.id}">{$v.name}</option>
                {else}
                <option value="{$v.id}">{$v.name}</option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">状 态</label>
        <div class="layui-input-inline">
            <select name="type" class="layui-select">
                <option value="">请选择</option>
                {foreach($list['type'] as $k=>$v)}
                {if $Think.get.type eq $k and $Think.get.type !=''}
                <option selected="selected" value="{$k}">{$v}</option>
                {else}
                <option onclick="text()" value="{$k}">{$v}</option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
</form>
<script>
    window.laydate.render({range: true, elem: '#range-date'});
</script>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="true" method="post">
    <!--{empty name='list'}-->
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    <!--{else}-->
    <input type="hidden" value="resort" name="action">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='text-left nowrap'>微信昵称</th>
            <th class='text-left nowrap'>用户名</th>
            <th class='text-left nowrap'>手机号</th>
            <th class='text-left nowrap'>会员等级</th>
            <th class='text-left nowrap'>注册时间</th>
            <th class='text-left nowrap'>状态</th>
            <th class='text-left nowrap'>上级用户</th>
            <th class='text-left nowrap'>团队人数</th>
            <th class='text-left nowrap'>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list['list'] as $key=>$vo}
        <tr>
            <td class='text-left nowrap '>
                {$vo.nickname|default="<span class='color-desc'>暂无</span>"|raw}
            </td>
            <td class='text-left nowrap'>
                {$vo.username}
            </td>
            <td class='text-left nowrap'>
                {$vo.mobile}
            </td>
            <td class='text-left nowrap'>
                {$vo.name}
            </td>
            <td class='text-left nowrap'>
                {$vo.add_time}
            </td>
            <td class='text-left nowrap'>
                {if condition="$vo.is_delete" eq 1}
                <a data-update="{$vo.id}" class="layui-btn layui-btn-xs layui-btn-normal" data-field='status' data-value='1' data-action='{:url("$classuri/editStatus")}'>{$vo.deleteNmae}</a>
                {else/}
                <a data-update="{$vo.id}" class="layui-btn layui-btn-danger layui-btn-xs" data-field='status' data-value='2' data-action='{:url("$classuri/editStatus")}'>{$vo.deleteNmae}</a>
                {/if}
            </td>
            <td class='text-owrap'>
                {$vo.pater|default='暂无'}
            </td>

            <td class='text-left nowrap'>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/userTeam")}?id={$vo.id}'>查看({$vo.teamcount})</a>
            </td>
            <td class='text-center nowrap '>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/redWithdraw")}?id={$vo.id}'>红包提现记录</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/edit")}?id={$vo.id}'>代理金提现记录</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/edit")}?id={$vo.id}'>会员提现记录</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/edit")}?id={$vo.id}'>详情</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/capiDetails")}?id={$vo.id}'>查看用户钱包</a>
                {if $vo.id eq 1}
                <span class="text-explode">|</span>
                <a class="color-desc ">资金明细</a>
                {else}
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("admin/admincapital/user")}?username={$vo.username}'>资金明细</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($list.page)}<p>{$list.page|raw}</p>{/if}
    <!--{/empty}-->
</form>
{/block}
{block name="script"}
<!--表单初始化-->
<script>
    window.laydate.render({range: true, elem: '#create_at'});
    window.form.render();
</script>

<!--引入标签设置-->
{/block}